package com.hit.server.biz.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
 * @Scheduled 默认单线程，需要多线程
 */
@Configuration
public class ScheduledConfig {

    @Bean
    public ScheduledExecutorService scheduledThreadPool() {
        ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(15);
        return scheduledThreadPool;
    }

}
